//设置拦截加载的网页外链，如拦截加载广告的js
chrome.webRequest.onBeforeRequest.addListener(
    function(details) {
        return {redirectUrl: chrome.extension.getURL("js/pojie.js")}; //returns.js是你要替换的js脚本
    },
    {
        //这些都是广告的js外链
        // //*://wkstatic.bdimg.com/static/wkcommon/pkg/*
        urls: ["*://d3d.3dwwwgame.com/*","*://www.dytt8.net/js2/*","*://g.csdnimg.cn/check-adblock/*",
        "*://g.csdnimg.cn/lib/fuckadblock/*","*://csdnimg.cn/public/common/indexSuperise/*",
        "*://pos.baidu.com/*","*://cpro.baidustatic.com/*","*://csdnimg.cn/public/common/indexSuperise/*",
        "*://ads.csdn.net/js/*","*://g.csdnimg.cn/fixed-sidebar/*","*://csdnimg.cn/asdf/*",
            "*://www.siemens.com/*","*://img-ads.csdn.net/*","*://www.dytt8.net/js1/*","*://www.dytt8.net/js/*",
        "*://mall.csdn.net/vip_code/*","*://csdnimg.cn/public/common/gotop/*"
            ,"*://csdnimg.cn/pubfooter/*",
            "*://wkstatic.bdimg.com/static/wapwenku/static/static_for_sf/sf_common/pkg/libs2_e5f36fb.js/*",
            "*://j.sdqoi2d.com/*"
        ],  //你要拦截的url地址
        types: ["script"]       //拦截类型为script，
    },
    ["blocking"] //类型blocking为拦截,

);
